cbuffer cbView : register( b0 )
{
	matrix View;
};

cbuffer cbProjection: register( b1 )
{
	matrix Projection;
};

cbuffer cbModel : register( b2 )
{
	matrix World;
	float4 vMeshColor;
};

//--------------------------------------------------------------------------------------
struct VS_INPUT
{
	float4 Pos : POSITION;
	float2 Tex : TEXCOORD0;
	float3 Normal : NORMAL;
	float3 Tangent : TANGENT;
	float3 Binormal : BINORMAL;
	float3 Color : COLOR;
};

struct PS_INPUT
{
	float4 Pos : SV_POSITION;
};

// Vertex Shader
PS_INPUT VS(VS_INPUT input)
{
	PS_INPUT output = (PS_INPUT)0;
	input.Pos.w = 1.0f;
	output.Pos = mul( input.Pos, World );
	output.Pos = mul( output.Pos, View );
	output.Pos = mul( output.Pos, Projection );
	return output;
}

// Pixel Shader
float4 PS( PS_INPUT input) : SV_TARGET
{
	float4 texelColor = {1 - input.Pos.z, 0.f, 0.f, 1.f};
		return texelColor;
}